#! /usr/bin/perl

use strict;
use diagnostics;
use Mail::Box::IMAP4::SSL;

my $inbox = Mail::Box::IMAP4::SSL->new(
	username    => 'spam@dssi.cti.gov.br',
	password    => 's3ms3nh4',
	server_name => 'mail.dssi.cti.gov.br',
	folder      => 'INBOX',
	port        => '993',
) or die "Problems creating IMAP4::SSL object\n";

my $archive = Mail::Box::IMAP4::SSL->new(
	username    => 'spam@dssi.cti.gov.br',
	password    => 's3ms3nh4',
	server_name => 'mail.dssi.cti.gov.br',
	folder      => 'INBOX.ARCHIVE',
	port        => '993',
) or die "Problems creating IMAP4::SSL object\n";

print "There is " . $inbox->messages . " in inbox.\n";
print "There is " . $archive->messages . " in archive.\n";

print "Connected.\n";
$inbox->close;
$archive->close;
